package com.udaos.modules.student.services;

import java.util.List;

import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import com.udaos.common.base.Service;
import com.udaos.models.enroll.Ud_enroll_progress;
import com.udaos.models.student.Ud_student;
import com.udaos.models.train.Ud_train_progress;
import com.udaos.modules.enroll.services.UdEnrollProgressService;
import com.udaos.modules.field.services.UdFieldService;
import com.udaos.modules.train.services.UdTrainProgressService;
import com.udaos.modules.trainer.services.UdTrainerService;
/**
 * 学员Service
 * @author mutaotao
 *
 */
@IocBean(args = { "refer:dao" })
public class UdStudentService extends Service<Ud_student>{
	
	@Inject
	private UdEnrollProgressService enrollProgressService;
	@Inject
	private UdTrainProgressService trainProgressService ;
	@Inject
	private UdFieldService fieldService;
	@Inject
	private UdTrainerService trainerService;

	public UdStudentService(Dao dao) {
		super(dao);
	}

	/**
	 * 获取入学进度
	 * @return
	 */
	public List<Ud_enroll_progress> getEnrollProgress() {
		return enrollProgressService.query();
	}

	/**
	 * 获取培训进度
	 * @return
	 */
	public List<Ud_train_progress> getTrainProgress() {
		return trainProgressService.query();
	}

	/**
	 * 获取场地列表
	 * @return
	 */
	public Object getFieldList() {  
		return fieldService.query(Cnd.where("state", "=", "1"));
	}

	/**
	 * 获取教练列表
	 * @return
	 */
	public Object getCoachList() {
		return trainerService.query(Cnd.where("state", "=", 0));
	}
}
